import dayjs from "dayjs";

export function useExample() {
  const columns: TableColumnList = [
    {
      label: "Id",
      prop: "Id",
      minWidth: 100
    },
    {
      label: "交易所",
      prop: "Long",
      minWidth: 120
    },
    {
      label: "股票名称",
      prop: "Str1",
      minWidth: 150
    },
    {
      label: "股票代码",
      prop: "Long",
      minWidth: 120
    },
    {
      label: "行情时间",
      minWidth: 180,
      prop: "CDate",
      formatter: ({ CDate }) => dayjs(CDate).format("YYYY-MM-DD HH:mm:ss")
    },
    {
      label: "更新时间",
      minWidth: 180,
      prop: "CDate",
      formatter: ({ CDate }) => dayjs(CDate).format("YYYY-MM-DD HH:mm:ss")
    },
    {
      label: "EMA12",
      prop: "Long",
      minWidth: 120
    },
    {
      label: "EMA26",
      prop: "Long",
      minWidth: 120
    },
    {
      label: "DIF",
      prop: "Long",
      minWidth: 120
    },
    {
      label: "DEA",
      prop: "Long",
      minWidth: 120
    }
  ];

  return {
    columns
  };
}
